package cn.iocoder.yudao.module.project.dal.mysql.internalcodeorderedit;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.project.dal.dataobject.internalcodeorderedit.InternalCodeOrderEditDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.project.controller.admin.internalcodeorderedit.vo.*;

/**
 * 订单编辑-删除相关内码 Mapper
 *
 * @author wangzuoyang
 */
@Mapper
public interface InternalCodeOrderEditMapper extends BaseMapperX<InternalCodeOrderEditDO> {

    default PageResult<InternalCodeOrderEditDO> selectPage(InternalCodeOrderEditPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<InternalCodeOrderEditDO>()
                .eqIfPresent(InternalCodeOrderEditDO::getInternalCodeId, reqVO.getInternalCodeId())
                .likeIfPresent(InternalCodeOrderEditDO::getName, reqVO.getName())
                .eqIfPresent(InternalCodeOrderEditDO::getExCode, reqVO.getExCode())
                .eqIfPresent(InternalCodeOrderEditDO::getOrderCode, reqVO.getOrderCode())
                .eqIfPresent(InternalCodeOrderEditDO::getOrderDetailId, reqVO.getOrderDetailId())
                .eqIfPresent(InternalCodeOrderEditDO::getType, reqVO.getType())
                .eqIfPresent(InternalCodeOrderEditDO::getMaterialCode, reqVO.getMaterialCode())
                .eqIfPresent(InternalCodeOrderEditDO::getCartonCodes, reqVO.getCartonCodes())
                .eqIfPresent(InternalCodeOrderEditDO::getBatchNumber, reqVO.getBatchNumber())
                .eqIfPresent(InternalCodeOrderEditDO::getBatchCheckNumber, reqVO.getBatchCheckNumber())
                .betweenIfPresent(InternalCodeOrderEditDO::getOperatingTime, reqVO.getOperatingTime())
                .eqIfPresent(InternalCodeOrderEditDO::getRemark, reqVO.getRemark())
                .eqIfPresent(InternalCodeOrderEditDO::getWeight, reqVO.getWeight())
                .eqIfPresent(InternalCodeOrderEditDO::getWeightStatus, reqVO.getWeightStatus())
                .eqIfPresent(InternalCodeOrderEditDO::getRigidity, reqVO.getRigidity())
                .eqIfPresent(InternalCodeOrderEditDO::getRigidityStatus, reqVO.getRigidityStatus())
                .eqIfPresent(InternalCodeOrderEditDO::getBalance, reqVO.getBalance())
                .eqIfPresent(InternalCodeOrderEditDO::getBalanceStatus, reqVO.getBalanceStatus())
                .eqIfPresent(InternalCodeOrderEditDO::getOperator, reqVO.getOperator())
                .betweenIfPresent(InternalCodeOrderEditDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(InternalCodeOrderEditDO::getRecycleId));
    }

}